//
//  CellForUser.m
//  ProjectA
//
//  Created by dllo on 16/3/7.
//  Copyright © 2016年 刘旺辉. All rights reserved.
//

#import "CellForUser.h"

@interface CellForUser ()

@end

@implementation CellForUser
- (void)dealloc {
    [_labelForIcon release];
    [_imageViewForIcon release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
       
        self.labelForIcon = [[UILabel alloc] init];
        [self.contentView addSubview:self.labelForIcon];
        [_labelForIcon release];
        
        self.imageViewForIcon = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageViewForIcon];
        [_imageViewForIcon release];
    }
    return self;
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.labelForIcon.frame = CGRectMake(15, 20, 50, self.bounds.size.height - 40);
    
    self.labelForIcon.font = [UIFont systemFontOfSize:17];
    
    self.imageViewForIcon.frame = CGRectMake(self.bounds.size.width - 30 - self.bounds.size.width / 6.f, 10, self.bounds.size.width / 7.f, self.bounds.size.width / 7.f);
    self.imageViewForIcon.layer.cornerRadius = self.imageViewForIcon.frame.size.width / 2.f;
    self.imageViewForIcon.layer.masksToBounds = YES;
    
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
